package com.edu.base.ums.grade.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.base.ums.grade.mapper.ClsMemberGradeMapper;
import com.edu.base.ums.grade.domain.ClsMemberGrade;
import com.edu.base.ums.grade.service.IClsMemberGradeService;
import com.ruoyi.common.utils.UUIDUtils;

/**
 * 会员等级Service业务层处理
 * 
 * @author lzs
 * @date 2021-07-14
 */
@Service
public class ClsMemberGradeServiceImpl implements IClsMemberGradeService 
{
    @Autowired
    private ClsMemberGradeMapper clsMemberGradeMapper;

    /**
     * 查询会员等级
     * 
     * @param id 会员等级ID
     * @return 会员等级
     */
    @Override
    public ClsMemberGrade selectClsMemberGradeById(String id)
    {
        return clsMemberGradeMapper.selectClsMemberGradeById(id);
    }

    /**
     * 查询会员等级列表
     * 
     * @param clsMemberGrade 会员等级
     * @return 会员等级
     */
    @Override
    public List<ClsMemberGrade> selectClsMemberGradeList(ClsMemberGrade clsMemberGrade)
    {
        return clsMemberGradeMapper.selectClsMemberGradeList(clsMemberGrade);
    }

    /**
     * 新增会员等级
     * 
     * @param clsMemberGrade 会员等级
     * @return 结果
     */
    @Override
    public int insertClsMemberGrade(ClsMemberGrade clsMemberGrade)
    {
    	clsMemberGrade.setId(UUIDUtils.getUUID());
        return clsMemberGradeMapper.insertClsMemberGrade(clsMemberGrade);
    }

    /**
     * 修改会员等级
     * 
     * @param clsMemberGrade 会员等级
     * @return 结果
     */
    @Override
    public int updateClsMemberGrade(ClsMemberGrade clsMemberGrade)
    {
        return clsMemberGradeMapper.updateClsMemberGrade(clsMemberGrade);
    }

    /**
     * 批量删除会员等级
     * 
     * @param ids 需要删除的会员等级ID
     * @return 结果
     */
    @Override
    public int deleteClsMemberGradeByIds(String[] ids)
    {
        return clsMemberGradeMapper.deleteClsMemberGradeByIds(ids);
    }

    /**
     * 删除会员等级信息
     * 
     * @param id 会员等级ID
     * @return 结果
     */
    @Override
    public int deleteClsMemberGradeById(String id)
    {
        return clsMemberGradeMapper.deleteClsMemberGradeById(id);
    }
}
